package com.dongrj.framework.excel;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.dongrj.framework.excel.converter.DateConverter;
import com.dongrj.framework.excel.converter.IntConverter;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
@EqualsAndHashCode
@ExcelIgnoreUnannotated
@HeadRowHeight(20)
@ColumnWidth(20)
public class DemoData {

    @ExcelProperty("名称")
    @ColumnWidth(35)
    private String string;

    @ExcelProperty(value = "创建时间", converter = DateConverter.F0Converter.class)
    private Date date;

    @ExcelIgnore
    private Double doubleData;

    // 0. 可用 1.不可用
    @ExcelProperty(value = "状态", converter = IntConverter.YeOrNoConverter.class)
    private Integer status;
}
